package com.wechat.server.mp.util;

import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONUtil;
import lombok.Data;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

/**
 * @description: toke
 * @author: stone
 * @date: Created by 2021/10/9 11:38
 * @version: 1.0.0
 * @pakeage: com.wechat.server.mp.util
 */
@Data
public class TokenUtil {
    private String access_token;
    private Long expires_at;
    private Integer expires_in;
    private String owner_id;
    private String owner_name;
    private Long r1_expires_at;
    private Integer r1_expires_in;
    private Long r2_expires_at;
    private Integer r2_expires_in;
    private String refresh_token;
    private Long refresh_token_expires_at;
    private Integer refresh_token_expires_in;
    private List<String> scope;
    private Long w1_expires_at;
    private Integer w1_expires_in;
    private Long w2_expires_at;
    private Integer w2_expires_in;

    public static Map<String, String> tokenMap = new HashMap<>();

    public static void main(String[] args) {
        //HttpRequest request = HttpRequest.post("你的url");
        //request.body("json字符串");
        //HttpResponse execute = request.execute();
        //String body = execute.body();
        //System.out.println(body);
        //
        //Map map = JSONUtil.toBean(body, Map.class);
        //tokenMap.put("token", (String) map.get("token"));

        System.out.println(UUID.randomUUID().toString().replaceAll("-", ""));

    }

}
